package zheezes.eisp.monitor.model;

import zheezes.eisp.data.orm.GroupPo;
import zheezes.model.ObservableTreeNode;

public class GroupTreeNode extends ObservableTreeNode {
	@Override
	public String getLabel() {
		GroupPo group = (GroupPo) data;
		if (group != null) {
			return group.getName();
		}
		return null;
	}

	@Override
	public void setLabel(String label) {
		GroupPo group = (GroupPo) data;
		if (group != null) {
			group.setName(label);
		}
	}

	public static void main(String[] args) {
		GroupTreeNode node = new GroupTreeNode();
		GroupPo group = new GroupPo();
		group.setName("AAA");
		node.setData(group);
		System.out.println(node.getLabel());
	}
}
